package at.fhooe.mcm.lri.mdmpoc.warehouse;

import at.fhooe.mcm.lri.mdmpoc.warehouse.dao.PersonDao;
import at.fhooe.mcm.lri.mdmpoc.warehouse.dao.TimingResultDao;
import at.fhooe.mcm.lri.mdmpoc.warehouse.dao.jdo.PersonJdoDao;
import at.fhooe.mcm.lri.mdmpoc.warehouse.dao.jdo.TimingResultJdoDao;




public class ServiceLocator {
	private static final ServiceLocator instance = new ServiceLocator();
	
	private PersonDao personDao;
	private TimingResultDao timingResultDao;

	private ServiceLocator() {
	}

	public static ServiceLocator getInstance() {
		return instance;
	}


	public PersonDao getPersonDao() {
		if (personDao == null)
			personDao = new PersonJdoDao();
		return personDao;
	}
	
	public TimingResultDao getTimingResultDao() {
		if (timingResultDao == null)
			timingResultDao = new TimingResultJdoDao();
		return timingResultDao;
	}
}
